layui.use([ 'element', 'form','laydate' ], function() {
	var element = layui.element(), form = layui.form(),laydate = layui.laydate;
	
	form.on('submit(formSubmit)', function(data) {
		var dataParam = data.field;
		console.info(dataParam);
		$.post(rootPath + "/storage/storageSave.shtml", dataParam, function(result) {
			if (!result.status) {
				layer.msg(result.message, {
					icon : 5,
					shift : 6
				});
			} else {
				var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
				parent.layer.close(index); //再执行关闭
				parent.layer.msg('保存成功', {
					icon : 1
				});
				parent.refreshStorageList();

			}
		}, "json");
		return false;
	});
	
});
